package v1

import (
	"time"
)

type AddTagRequest struct {
	Name     string `json:"tagName" binding:"required" example:"Hertzs"`
	Describe string `json:"describe"`
}

type DeleteTagRequest struct {
	TagId int64 `uri:"tagId" binding:"required" example:"1"`
}

type DeleteTagResponse struct {
	TagId int64 `json:"tagId" example:"1"`
}

type UpdateTagRequest struct {
	TagId    int64  `uri:"tagId" binding:"required" example:"1"`
	TagName  string `json:"tagName" example:"云原生"`
	Describe string `json:"describe" example:"云原生"`
}

type GetTagByIdRequest struct {
	TagId int64 `uri:"tagId" binding:"required" example:"1"`
}

type GetTagByIdResponse struct {
	TagId     int64       `json:"tagId" example:"1"`
	Name      string      `json:"tagName"`
	Describe  string      `json:"describe"`
	CreatedAt time.Time   `json:"createdAt"`
	UpdatedAt time.Time   `json:"updatedAt"`
	DeletedAt interface{} `json:"deletedAt"`
}

type GetTagRequest struct {
	// 第几页
	Page int `form:"page" binding:"required" example:"10"`
	// 页面大小
	PageSize int `form:"pageSize" binding:"required" example:"1"`
}

// 获取标签返回体
type GetTagResponse struct {
	Total  int64                `json:"total" example:"10"`
	Record []GetTagByIdResponse `json:"record"`
}

type TestResp struct {
	Id       int         `json:"id"`
	ParentId int         `json:"parentId"`
	Children []*TestResp `json:"children"`
}
